<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsecure: xsecure_lms.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsecure
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xsecure__lms_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">xsecure_lms.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains structures, constants and defines used in LMS and HSS provides interface to LMS operations. </p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date        Changes
----- ---- -------- ----------------------------------------------------------
5.4   kal  07/24/24 Initial release</pre><pre></pre><dl class="section note"><dt>Note</dt><dd></dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_secure___lms_param.html">XSecure_LmsParam</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure for maintaining parameters for each LMS Type.  <a href="struct_x_secure___lms_param.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">union &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="union_x_secure___lms_public_key__.html">XSecure_LmsPublicKey_</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">LMS Public key structure to access root value.  <a href="union_x_secure___lms_public_key__.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">union &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="union_x_secure___lms_pub_key_tmp__.html">XSecure_LmsPubKeyTmp_</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used to store data which is repeatedly sent to SHA engine, during LMS root value calculation.  <a href="union_x_secure___lms_pub_key_tmp__.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:af76f88234c6663ffdf82535f7acb89ad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#af76f88234c6663ffdf82535f7acb89ad">XSECURE_LMS_TYPE_MAX_SUPPORTED</a>&#160;&#160;&#160;(9U)</td></tr>
<tr class="memdesc:af76f88234c6663ffdf82535f7acb89ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max supported types, used for creating lookup table for parameters for types supported number should be max valid + 1 (as first slot will be for invalid parameters) XSecure_LmsType from 0 (unsupported) to XSECURE_LMS_SHAKE_M32_H20.  <a href="#af76f88234c6663ffdf82535f7acb89ad">More...</a><br/></td></tr>
<tr class="separator:af76f88234c6663ffdf82535f7acb89ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a5f079495df8a194b92d5484aaa4f4d69"><td class="memItemLeft" align="right" valign="top">typedef union <a class="el" href="union_x_secure___lms_public_key__.html">XSecure_LmsPublicKey_</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#a5f079495df8a194b92d5484aaa4f4d69">XSecure_LmsPublicKey</a></td></tr>
<tr class="memdesc:a5f079495df8a194b92d5484aaa4f4d69"><td class="mdescLeft">&#160;</td><td class="mdescRight">LMS Public key structure to access root value.  <a href="#a5f079495df8a194b92d5484aaa4f4d69">More...</a><br/></td></tr>
<tr class="separator:a5f079495df8a194b92d5484aaa4f4d69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a358c5fe9d56f4b26394fb1b1ab715072"><td class="memItemLeft" align="right" valign="top">typedef union <a class="el" href="union_x_secure___lms_pub_key_tmp__.html">XSecure_LmsPubKeyTmp_</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#a358c5fe9d56f4b26394fb1b1ab715072">XSecure_LmsPubKeyTmp</a></td></tr>
<tr class="memdesc:a358c5fe9d56f4b26394fb1b1ab715072"><td class="mdescLeft">&#160;</td><td class="mdescRight">Used to store data which is repeatedly sent to SHA engine, during LMS root value calculation.  <a href="#a358c5fe9d56f4b26394fb1b1ab715072">More...</a><br/></td></tr>
<tr class="separator:a358c5fe9d56f4b26394fb1b1ab715072"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a87557e3db575e6dc9ad6ddfc596a554a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554a">XSecure_LmsType</a> { , <br/>
&#160;&#160;<a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aafb791256faee65ba5ad4b6ca3c3363bf">XSECURE_LMS_SHA256_M32_H10</a> = 0x00000006U,
<a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa780120c8960bf510af7d609062de8969">XSECURE_LMS_SHA256_M32_H15</a> = 0x00000007U,
<a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa80dcd06ec2001fac0c12c665b950a9cb">XSECURE_LMS_SHA256_M32_H20</a> = 0x00000008U,
<a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa7cc64a98b98653720f6721fd404861ee">XSECURE_LMS_SHAKE_M32_H5</a> = 0x0000000FU,
<br/>
&#160;&#160;<a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aafac10a46324772bf350225e72bd115ab">XSECURE_LMS_SHAKE_M32_H10</a> = 0x00000010U,
<a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa7a1f0dcb8420bfd39406dd2b599dfe8d">XSECURE_LMS_SHAKE_M32_H15</a> = 0x00000011U,
<a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa86367264345526110c4b59286d3186b0">XSECURE_LMS_SHAKE_M32_H20</a> = 0x00000012U,
<a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa2c49e5b42557925b34b58f162bb3fc31">XSECURE_LMS_NOT_SUPPORTED</a>
<br/>
 }</td></tr>
<tr class="memdesc:a87557e3db575e6dc9ad6ddfc596a554a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Supported LMS Types from standard.  <a href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554a">More...</a><br/></td></tr>
<tr class="separator:a87557e3db575e6dc9ad6ddfc596a554a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfea850f87a3e52a4a69c40eb98b3e06"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#abfea850f87a3e52a4a69c40eb98b3e06">XSecure_LmsTreeHeight</a> </td></tr>
<tr class="memdesc:abfea850f87a3e52a4a69c40eb98b3e06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Different Heights supported for Merkle Tree, 'h'=25 not supported.  <a href="xsecure__lms_8h.html#abfea850f87a3e52a4a69c40eb98b3e06">More...</a><br/></td></tr>
<tr class="separator:abfea850f87a3e52a4a69c40eb98b3e06"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a292e1e3bc9bd3759b76c98cfd8196deb"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#a292e1e3bc9bd3759b76c98cfd8196deb">XSecure_LmsLookupParamSet</a> (<a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554a">XSecure_LmsType</a> <a class="el" href="xsecure__lms__ots_8h.html#a8edafe9629f0c895a14f0e7445bcbd5c">Type</a>, <a class="el" href="struct_x_secure___lms_param.html">XSecure_LmsParam</a> **Parameters)</td></tr>
<tr class="memdesc:a292e1e3bc9bd3759b76c98cfd8196deb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns the parameters for the type of LMS type.  <a href="#a292e1e3bc9bd3759b76c98cfd8196deb">More...</a><br/></td></tr>
<tr class="separator:a292e1e3bc9bd3759b76c98cfd8196deb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ad791d9e1429769813662aba9239f80d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554a">XSecure_LmsType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#ad791d9e1429769813662aba9239f80d0">LmsType</a></td></tr>
<tr class="memdesc:ad791d9e1429769813662aba9239f80d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">LmsType <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554a">XSecure_LmsType</a> Size - 4 bytes, 0 to 3 in public key.  <a href="#ad791d9e1429769813662aba9239f80d0">More...</a><br/></td></tr>
<tr class="separator:ad791d9e1429769813662aba9239f80d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cf79ec4da442314c4ec381d3eae4341"><td class="memItemLeft" align="right" valign="top"><a class="el" href="xsecure__lms__ots_8h.html#ac44fed4428b1bce22f588c3c913818fd">XSecure_LmsOtsType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#a8cf79ec4da442314c4ec381d3eae4341">OtsType</a></td></tr>
<tr class="memdesc:a8cf79ec4da442314c4ec381d3eae4341"><td class="mdescLeft">&#160;</td><td class="mdescRight">OtsType <a class="el" href="xsecure__lms__ots_8h.html#ac44fed4428b1bce22f588c3c913818fd">XSecure_LmsOtsType</a> Size - 4 bytes, 4 to 7 bytes in public key.  <a href="#a8cf79ec4da442314c4ec381d3eae4341">More...</a><br/></td></tr>
<tr class="separator:a8cf79ec4da442314c4ec381d3eae4341"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69712f57c19e65ed4c5dd7a4b0e03f74"><td class="memItemLeft" align="right" valign="top">u8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#a69712f57c19e65ed4c5dd7a4b0e03f74">I</a> [XSECURE_LMS_I_FIELD_SIZE]</td></tr>
<tr class="memdesc:a69712f57c19e65ed4c5dd7a4b0e03f74"><td class="mdescLeft">&#160;</td><td class="mdescRight">I - Merkle Tree's unique identifier (uniformly random 16-byte string) Size - 16 bytes, 8 to 23 bytes in public key.  <a href="#a69712f57c19e65ed4c5dd7a4b0e03f74">More...</a><br/></td></tr>
<tr class="separator:a69712f57c19e65ed4c5dd7a4b0e03f74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83639ff7518614bf625e6cf1aa3a61c5"><td class="memItemLeft" align="right" valign="top">u8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#a83639ff7518614bf625e6cf1aa3a61c5">T</a> [XSECURE_LMS_PUB_KEY_T_FIELD_SIZE]</td></tr>
<tr class="memdesc:a83639ff7518614bf625e6cf1aa3a61c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">T[1] - H(I||u32str(r)||u16str(D_INTR)||T[2*r]||T[2*r+1])  <a href="#a83639ff7518614bf625e6cf1aa3a61c5">More...</a><br/></td></tr>
<tr class="separator:a83639ff7518614bf625e6cf1aa3a61c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99ac7187ba8f40d18d39ffd7ff8dc202"><td class="memItemLeft" align="right" valign="top">u32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#a99ac7187ba8f40d18d39ffd7ff8dc202">half_node_number</a></td></tr>
<tr class="memdesc:a99ac7187ba8f40d18d39ffd7ff8dc202"><td class="mdescLeft">&#160;</td><td class="mdescRight">(node number/2), used to get unique hash o/p for same data for every node Size - 4 bytes, 16 to 20 bytes  <a href="#a99ac7187ba8f40d18d39ffd7ff8dc202">More...</a><br/></td></tr>
<tr class="separator:a99ac7187ba8f40d18d39ffd7ff8dc202"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab14788fbc92abcbc0e153a93b1f28cd2"><td class="memItemLeft" align="right" valign="top">u8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#ab14788fbc92abcbc0e153a93b1f28cd2">D</a> [XSECURE_LMS_D_FIELD_SIZE]</td></tr>
<tr class="memdesc:ab14788fbc92abcbc0e153a93b1f28cd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">D - XSECURE_D_INTR or XSECURE_D_PLEAF Size - 2 bytes, 21st &amp; 22nd byte.  <a href="#ab14788fbc92abcbc0e153a93b1f28cd2">More...</a><br/></td></tr>
<tr class="separator:ab14788fbc92abcbc0e153a93b1f28cd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4673f3d74cf8e02780128c930ef01620"><td class="memItemLeft" align="right" valign="top">u8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsecure__lms_8h.html#a4673f3d74cf8e02780128c930ef01620">Tmp</a> [XSECURE_LMS_M_BYTE_FIELD_SIZE+XSECURE_LMS_M_BYTE_FIELD_SIZE]</td></tr>
<tr class="memdesc:a4673f3d74cf8e02780128c930ef01620"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tmp - Used to store previous hash output and adjacent node value in right order to send to SHA engine Size - 32 * 2 = 64 bytes, 23 to 85 bytes.  <a href="#a4673f3d74cf8e02780128c930ef01620">More...</a><br/></td></tr>
<tr class="separator:a4673f3d74cf8e02780128c930ef01620"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="af76f88234c6663ffdf82535f7acb89ad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_LMS_TYPE_MAX_SUPPORTED&#160;&#160;&#160;(9U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Max supported types, used for creating lookup table for parameters for types supported number should be max valid + 1 (as first slot will be for invalid parameters) XSecure_LmsType from 0 (unsupported) to XSECURE_LMS_SHAKE_M32_H20. </p>

<p>Referenced by <a class="el" href="xsecure__lms_8h.html#a292e1e3bc9bd3759b76c98cfd8196deb">XSecure_LmsLookupParamSet()</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a358c5fe9d56f4b26394fb1b1ab715072"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef union <a class="el" href="union_x_secure___lms_pub_key_tmp__.html">XSecure_LmsPubKeyTmp_</a>  <a class="el" href="xsecure__lms_8h.html#a358c5fe9d56f4b26394fb1b1ab715072">XSecure_LmsPubKeyTmp</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Used to store data which is repeatedly sent to SHA engine, during LMS root value calculation. </p>
<p>Size = 16(I) + 4(node_number/2) + 2(D_INTR) + (32 * 2) </p>

</div>
</div>
<a class="anchor" id="a5f079495df8a194b92d5484aaa4f4d69"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef union <a class="el" href="union_x_secure___lms_public_key__.html">XSecure_LmsPublicKey_</a>  <a class="el" href="xsecure__lms_8h.html#a5f079495df8a194b92d5484aaa4f4d69">XSecure_LmsPublicKey</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>LMS Public key structure to access root value. </p>
<p>Size = 4 + 4 + 16 + H Len (32) = 56 Bytes </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="abfea850f87a3e52a4a69c40eb98b3e06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="xsecure__lms_8h.html#abfea850f87a3e52a4a69c40eb98b3e06">XSecure_LmsTreeHeight</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Different Heights supported for Merkle Tree, 'h'=25 not supported. </p>

</div>
</div>
<a class="anchor" id="a87557e3db575e6dc9ad6ddfc596a554a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554a">XSecure_LmsType</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Supported LMS Types from standard. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a87557e3db575e6dc9ad6ddfc596a554aafb791256faee65ba5ad4b6ca3c3363bf"></a>XSECURE_LMS_SHA256_M32_H10</em>&nbsp;</td><td class="fielddoc">
<p>'M' = 32, 'H' = SHA2-256, 'h' = 5 </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a87557e3db575e6dc9ad6ddfc596a554aa780120c8960bf510af7d609062de8969"></a>XSECURE_LMS_SHA256_M32_H15</em>&nbsp;</td><td class="fielddoc">
<p>'M' = 32, 'H' = SHA2-256, 'h' = 10 </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a87557e3db575e6dc9ad6ddfc596a554aa80dcd06ec2001fac0c12c665b950a9cb"></a>XSECURE_LMS_SHA256_M32_H20</em>&nbsp;</td><td class="fielddoc">
<p>'M' = 32, 'H' = SHA2-256, 'h' = 15 </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a87557e3db575e6dc9ad6ddfc596a554aa7cc64a98b98653720f6721fd404861ee"></a>XSECURE_LMS_SHAKE_M32_H5</em>&nbsp;</td><td class="fielddoc">
<p>'M' = 32, 'H' = SHA2-256, 'h' = 20 </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a87557e3db575e6dc9ad6ddfc596a554aafac10a46324772bf350225e72bd115ab"></a>XSECURE_LMS_SHAKE_M32_H10</em>&nbsp;</td><td class="fielddoc">
<p>'M' = 32, 'H' = SHAKE-256, 'h' = 5 </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a87557e3db575e6dc9ad6ddfc596a554aa7a1f0dcb8420bfd39406dd2b599dfe8d"></a>XSECURE_LMS_SHAKE_M32_H15</em>&nbsp;</td><td class="fielddoc">
<p>'M' = 32, 'H' = SHAKE-256, 'h' = 10 </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a87557e3db575e6dc9ad6ddfc596a554aa86367264345526110c4b59286d3186b0"></a>XSECURE_LMS_SHAKE_M32_H20</em>&nbsp;</td><td class="fielddoc">
<p>'M' = 32, 'H' = SHAKE-256, 'h' = 15 </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a87557e3db575e6dc9ad6ddfc596a554aa2c49e5b42557925b34b58f162bb3fc31"></a>XSECURE_LMS_NOT_SUPPORTED</em>&nbsp;</td><td class="fielddoc">
<p>'M' = 32, 'H' = SHAKE-256, 'h' = 20 </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a292e1e3bc9bd3759b76c98cfd8196deb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_LmsLookupParamSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554a">XSecure_LmsType</a>&#160;</td>
          <td class="paramname"><em>Type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_secure___lms_param.html">XSecure_LmsParam</a> **&#160;</td>
          <td class="paramname"><em>Parameters</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function returns the parameters for the type of LMS type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Type</td><td>XSecure_LmsType, type of OTS algorithm selected </td></tr>
    <tr><td class="paramname">Parameters</td><td>Pointer to array location where all predefined parameter values are present <a class="el" href="struct_x_secure___lms_param.html">XSecure_LmsParam</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS - Valid type is passed, and parameters are assigned</li>
<li>XST_FAILURE - If not a valid type is passed </li>
</ul>
</dd></dl>
<p>160U</p>
<p>320U</p>
<p>480U</p>
<p>640U</p>
<p>160U</p>
<p>320U</p>
<p>480U</p>
<p>640U </p>

<p>References <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa2c49e5b42557925b34b58f162bb3fc31">XSECURE_LMS_NOT_SUPPORTED</a>, <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aafb791256faee65ba5ad4b6ca3c3363bf">XSECURE_LMS_SHA256_M32_H10</a>, <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa780120c8960bf510af7d609062de8969">XSECURE_LMS_SHA256_M32_H15</a>, <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa80dcd06ec2001fac0c12c665b950a9cb">XSECURE_LMS_SHA256_M32_H20</a>, <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aafac10a46324772bf350225e72bd115ab">XSECURE_LMS_SHAKE_M32_H10</a>, <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa7a1f0dcb8420bfd39406dd2b599dfe8d">XSECURE_LMS_SHAKE_M32_H15</a>, <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa86367264345526110c4b59286d3186b0">XSECURE_LMS_SHAKE_M32_H20</a>, <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554aa7cc64a98b98653720f6721fd404861ee">XSECURE_LMS_SHAKE_M32_H5</a>, <a class="el" href="group__xsecure__error__codes.html#ggacba8dc046b878afa42fdc63ce1dc2574a5b5ca03645d66f1e6bd95539a5928abf">XSECURE_LMS_TYPE_LOOKUP_GLITCH_ERROR</a>, <a class="el" href="xsecure__lms_8h.html#af76f88234c6663ffdf82535f7acb89ad">XSECURE_LMS_TYPE_MAX_SUPPORTED</a>, <a class="el" href="group__xsecure__error__codes.html#ggacba8dc046b878afa42fdc63ce1dc2574aa15d24504679d0c2ed1521469fa6ab66">XSECURE_LMS_TYPE_UNSUPPORTED_ERROR</a>, <a class="el" href="group__xsecure__helper__server__apis.html#ga5738537e51cc4a10f5753b092955c4b0">XSECURE_SHA2_256_HASH_LEN</a>, <a class="el" href="group__xsecure__sha__example__apis.html#gad83e90d954ca31ac3d9cc687321cdb2d">XSECURE_SHAKE_256</a>, and <a class="el" href="group__xsecure__helper__server__apis.html#ga7af13060e1711b13d1d20bdbed3c20f5">XSECURE_SHAKE_256_HASH_LEN</a>.</p>

<p>Referenced by <a class="el" href="xsecure__lms__core_8h.html#a4fe7fa250fbd0908fb92b6f65becf08e">XSecure_GetLmsHashAlgo()</a>, <a class="el" href="xsecure__lms__core_8h.html#a112da8c38a140d02852bd8f93ab78e2f">XSecure_HssFinish()</a>, <a class="el" href="xsecure__lms__core_8h.html#a981b22fbc50d9cd6f91c16604754f078">XSecure_HssInit()</a>, and <a class="el" href="xsecure__lms__core_8h.html#a6b50f9fb052dd231c50ea15138f17ff7">XSecure_LmsSignatureVerification()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="ab14788fbc92abcbc0e153a93b1f28cd2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u8 D[XSECURE_LMS_D_FIELD_SIZE]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>D - XSECURE_D_INTR or XSECURE_D_PLEAF Size - 2 bytes, 21st &amp; 22nd byte. </p>

<p>Referenced by <a class="el" href="group__xsecure__ecdsa__server__apis.html#ga682282def21e1c86ab583cdd41090fbb">XSecure_EllipticGenerateKey_64Bit()</a>, <a class="el" href="group__xsecure__ecdsa__server__apis.html#ga3af7e8a366bb982fa4c0c82be1b37250">XSecure_EllipticGenerateSignature_64Bit()</a>, <a class="el" href="group__xsecure__kat__server__apis.html#ga75b2f22f2f6c3bdb9529025c8ecf58f2">XSecure_EllipticSignGenerateKat()</a>, and <a class="el" href="group__xsecure__kat__server__apis.html#gae13868848d86bd438b31458a8b3aaad8">XSecure_GetKatEccPrivateKey()</a>.</p>

</div>
</div>
<a class="anchor" id="a99ac7187ba8f40d18d39ffd7ff8dc202"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u32 half_node_number</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>(node number/2), used to get unique hash o/p for same data for every node Size - 4 bytes, 16 to 20 bytes </p>

</div>
</div>
<a class="anchor" id="a69712f57c19e65ed4c5dd7a4b0e03f74"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u8 I</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>I - Merkle Tree's unique identifier (uniformly random 16-byte string) Size - 16 bytes, 8 to 23 bytes in public key. </p>
<p>I - Merkle Tree's unique identifier (uniformly random 16-byte string) Size - 16 bytes, 1 to 16 bytes.</p>
<p>I - Merkle Tree's unique identifier (uniformly random 16-byte string) Size - 16 bytes, 0 to 15 bytes. </p>

</div>
</div>
<a class="anchor" id="ad791d9e1429769813662aba9239f80d0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554a">XSecure_LmsType</a> LmsType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>LmsType <a class="el" href="xsecure__lms_8h.html#a87557e3db575e6dc9ad6ddfc596a554a">XSecure_LmsType</a> Size - 4 bytes, 0 to 3 in public key. </p>

</div>
</div>
<a class="anchor" id="a8cf79ec4da442314c4ec381d3eae4341"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="xsecure__lms__ots_8h.html#ac44fed4428b1bce22f588c3c913818fd">XSecure_LmsOtsType</a> OtsType</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>OtsType <a class="el" href="xsecure__lms__ots_8h.html#ac44fed4428b1bce22f588c3c913818fd">XSecure_LmsOtsType</a> Size - 4 bytes, 4 to 7 bytes in public key. </p>

</div>
</div>
<a class="anchor" id="a83639ff7518614bf625e6cf1aa3a61c5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u8 T[XSECURE_LMS_PUB_KEY_T_FIELD_SIZE]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>T[1] - H(I||u32str(r)||u16str(D_INTR)||T[2*r]||T[2*r+1]) </p>
<p>'H' is a hash function, PLM supports only SHA2-256 and SHAKE-256 both are of 32Byte output len</p>
<p>'r' is the node number, same as 'q', goes from 0 on left most leaf to right most (2^h -1), in a single tree D_INTR is a constant XSECURE_D_INTR </p>

</div>
</div>
<a class="anchor" id="a4673f3d74cf8e02780128c930ef01620"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u8 Tmp[XSECURE_LMS_M_BYTE_FIELD_SIZE+XSECURE_LMS_M_BYTE_FIELD_SIZE]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Tmp - Used to store previous hash output and adjacent node value in right order to send to SHA engine Size - 32 * 2 = 64 bytes, 23 to 85 bytes. </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
